﻿using System.Collections.Generic;
using HMIS.FrameWork.DomainBase;
using HMIS.Infrastructure.Core.Authority;
using HMIS.Infrastructure.Core.Repositories;

namespace HMIS.Infrastructure.Facade.Authority.Impl
{
    public class HospUserFacadeImpl : IHospUserFacade
    {
        private readonly IHospUserRepository HospUserRepository;
        public HospUserFacadeImpl(IHospUserRepository HospUserRepository)
        {
            this.HospUserRepository = HospUserRepository;
        }


        #region IHospUserFacade 成员

		public IList<HospUser> GetPlist(int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return HospUserRepository.GetPlist(start, limit, sort, dir, filters, out total);
		}
				
        public IList<HospUser> GetPlistAll(int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
        {
            return HospUserRepository.GetPlistAll(start, limit, sort, dir, filters, out total);
        }

        public bool IsFieldExist(string fieldName, string fieldValue, string id)
        {
            return HospUserRepository.IsFieldExist(fieldName, fieldValue, id);
        }

        public void SaveOrUpdate(HospUser entity)
        {
            HospUserRepository.SaveOrUpdate(entity);
        }

        public HospUser Load(string id)
        {
            return HospUserRepository.Load(id);
        }

        public HospUser Get(string id)
        {
            return HospUserRepository.Get(id);
        }

        public HospUser GetById(string id)
        {
            return HospUserRepository.GetById(id);
        }

		public HospUser GetByIdWithMenu(string id)
		{
			return HospUserRepository.GetByIdWithMenu(id);
		}

        public void Delete(string id)
        {
            HospUserRepository.Delete(id);
        }

        public IList<HospUser> GetListByRoleCode(string roleCode, string sort, string dir)
        {
            return HospUserRepository.GetListByRoleCode(roleCode, sort, dir);
        }

		public IList<HospUser> QueryPList(string query, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return HospUserRepository.QueryPList(query, start, limit, sort, dir, filters, out total);
		}

		public IList<object[]> GetUserListByDep(string query, string depCode, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return HospUserRepository.GetUserListByDep(query, depCode, start, limit, sort, dir, filters, out total);
		}

		public IList<HospUser> GetUserListByRoleAndDep(string query, string roleCode, string depCode, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return HospUserRepository.GetUserListByRoleAndDep(query, roleCode, depCode, start, limit, sort, dir, filters, out total);
		}

        #endregion
    }
}
